package your.simple.java.gid;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

import your.simple.java.bo.Car;
import your.simple.java.service.TransaccionTarjetaCreditoService;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        System.out.println( "Hello World!" );
      
        Car carObj = new Car("Rojo");
        System.out.print(carObj.getColor());
        
        BeanFactory beanFactory = new XmlBeanFactory(new ClassPathResource("ApplicationContext.xml"));
        Car carobj2 = beanFactory.getBean("car", Car.class);
        
        System.out.println(carobj2.getColor());
        System.out.println(carobj2.getYear());
        
        TransaccionTarjetaCreditoService tx = beanFactory.getBean("transactionService", TransaccionTarjetaCreditoService.class);
        tx.depositoTarjeta("text");
        
        
    }
}
